package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PurchaseOrganizationsMapper;
import com.ruoyi.system.domain.PurchaseOrganizations;
import com.ruoyi.system.service.IPurchaseOrganizationsService;

/**
 * 采购组织Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-13
 */
@Service
public class PurchaseOrganizationsServiceImpl implements IPurchaseOrganizationsService 
{
    @Autowired
    private PurchaseOrganizationsMapper purchaseOrganizationsMapper;

    /**
     * 查询采购组织
     * 
     * @param poId 采购组织主键
     * @return 采购组织
     */
    @Override
    public PurchaseOrganizations selectPurchaseOrganizationsByPoId(Long poId)
    {
        return purchaseOrganizationsMapper.selectPurchaseOrganizationsByPoId(poId);
    }

    /**
     * 查询采购组织列表
     * 
     * @param purchaseOrganizations 采购组织
     * @return 采购组织
     */
    @Override
    public List<PurchaseOrganizations> selectPurchaseOrganizationsList(PurchaseOrganizations purchaseOrganizations)
    {
        return purchaseOrganizationsMapper.selectPurchaseOrganizationsList(purchaseOrganizations);
    }

    /**
     * 新增采购组织
     * 
     * @param purchaseOrganizations 采购组织
     * @return 结果
     */
    @Override
    public int insertPurchaseOrganizations(PurchaseOrganizations purchaseOrganizations)
    {
        return purchaseOrganizationsMapper.insertPurchaseOrganizations(purchaseOrganizations);
    }

    /**
     * 修改采购组织
     * 
     * @param purchaseOrganizations 采购组织
     * @return 结果
     */
    @Override
    public int updatePurchaseOrganizations(PurchaseOrganizations purchaseOrganizations)
    {
        return purchaseOrganizationsMapper.updatePurchaseOrganizations(purchaseOrganizations);
    }

    /**
     * 批量删除采购组织
     * 
     * @param poIds 需要删除的采购组织主键
     * @return 结果
     */
    @Override
    public int deletePurchaseOrganizationsByPoIds(Long[] poIds)
    {
        return purchaseOrganizationsMapper.deletePurchaseOrganizationsByPoIds(poIds);
    }

    /**
     * 删除采购组织信息
     * 
     * @param poId 采购组织主键
     * @return 结果
     */
    @Override
    public int deletePurchaseOrganizationsByPoId(Long poId)
    {
        return purchaseOrganizationsMapper.deletePurchaseOrganizationsByPoId(poId);
    }
}
